﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Web.UI;
using JQuery.Net.UI;

namespace JQuery.Net
{
    public class JQNRegistration
    {
        public JQNRegistration()
        {
            Core = true;
            Widget = true;
            Mouse = true;
            Position = true;
        }

        public bool Core { get; set; }

        public bool Widget { get; set; }

        public bool Mouse { get; set; }

        public bool Position { get; set; }
    }

    public interface IjQNetControl
        : IjQNetAPI
    {
        #region event handler
        event DataRequestHandler DataRequest;
        #endregion

        #region properties
        /// <summary>
        /// get or set jQNet type of data source. i.e: local, server, callback
        /// </summary>
        DataSourceType SourceType { get; set; }
        #endregion
    }

    public interface IjQNetAPI
        : IDisposable
    {
        /// <summary>
        /// Register any script includes that are required for the control.
        /// </summary>
        /// <param name="register"></param>
        void RegisterScriptIncludes(JQNRegistration register);
        /// <summary>
        /// register a startup script that will run when the document is ready.
        /// </summary>
        /// <param name="manager">ASP.Net Page Script Manager</param>
        void RegisterStartupScript(StringWriter writer);        
    }
}
